<?php

namespace app\admin\validate;

use think\Validate;

class Login extends Validate
{
    public $rule = [
        'mobile' => 'require|mobile',
        'username'=>'require',
        'code' => 'require',
        'password' => 'require'
    ];
    public $message = [
        'mobile.require' => '手机号不能为空',
        'mobile.mobile' => '手机号不正确',
        'username.require' => '请填写帐号',
        'code.require' => '请填写验证码',
        'password.require'=>'密码不能为空'
    ];
    
    public $scene = [
        'loginPasswd' => ['username','password'],
        'loginMobile'=>['mobile','code'],
        'getCode'=>['mobile']
    ];

}

?>